package com.hotel.api.mapper;

import com.hotel.api.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {

    int insert(User record);


    User findByUsername(@Param("phoneNumber") String phoneNumber);

    public User selectByName(String name);


    List<User> selectAll();

    int update(User user);

    User selectById(Integer id);

    User selectBypassword(@Param("password") String password, @Param("name") String name);


    User selectByUserName(String phoneNumber);


    User selectByPhoneNumber(String phoneNumber);

    User selectByIdcard(String idcard);

    User selectByCompany(String company);

    List<User> selectByRoomId(@Param("rid") Integer rid);

    int deleteUser(Integer id);

}